package PTA.javaB;
import java.util.Scanner;

public class ex03 {
    public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
int sum1=0;
int sum2=0;
for(int i=0;i<n;i++)
{
    int b= sc.nextInt();
    if(b%2!=0){
       sum1=sum1+b;
    }else if(b%2==0){
        sum2=sum2+b;
    }
}
        System.out.println("奇数和="+sum1+","+"偶数和="+sum2 );
    }
}
